<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Sistem Informasi Pemilukada Kota Pekanbaru</title>
    <!-- Ext -->
 <?php
 /*

*/
/*
//sepertinya yang online error kalau koneksi lelet, jadi pakai yang di localhost/ext-4.1.1a
	<link rel="stylesheet" type="text/css" href="http://localhost/ext-4.1.1a/resources/css/ext-all.css"/>
    <script type="text/javascript" src="http://localhost/ext-4.1.1a/ext-all.js"></script>
	
	
online
    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-4.0.7-commercial/resources/css/ext-all.css"/>
    <script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all.js"></script>

	
	Google CDN

<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/ext-2.2/release/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/ext-2.2/release/ext-all.js"></script>
	
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/extjs-4.1.1a/release/resources/css/ext-all.css"></script>
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/extjs-4.1.1a/release/ext-all.js"></script>	

    <!-- Google Map v3 -->

*/

?>


	
    <!-- Google Map v3 -->
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&sensor=false"></script>

	
    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-4.0.7-commercial/resources/css/ext-all.css"/>
    
	<script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all.js"></script>
	<!--script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext.js"></script-->
    <link rel="stylesheet" type="text/css" href="layout-browser.css">

    <!-- load tree-->
	<script type="text/javascript" src="/json/kelurahan"></script>
    <!-- load shape-->
	<script type="text/javascript" src="/json/shape_all"></script>

    <!-- local storage-->
	<script type="text/javascript" src="localStorage.js"></script>
		
    <script type="text/javascript" src="chart.js"></script>
    <script type="text/javascript" src="ux/GMapPanel3.js"></script>
    <script type="text/javascript" src="app.js"></script>

    <script type="text/javascript">


      var kel_tangkerang_selatan = new google.maps.LatLng(0.490198,101.460795);
      //var it = new google.maps.Polygon();
      function initialize() {
        var mapOptions = {
          center: kel_tangkerang_selatan,
          zoom: 14,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);
        //it.setMap(map)
	  }
	//googleMap
	//var t=setTimeout(initialize,5000);//call googlemap after 5 s
	
	//array to LatLong
	function ar2path(ar){
		i=0;
		ret=[];
		for(i=0;i<ar.length;i++){
			ret[i]=new google.maps.LatLng(ar[i][0],ar[i][1]);
		}
		return ret;
	}
	
	//fungsi untuk mengubah path menjadi polygon untuk kelurahan id
	function path2polygon(kelurahan){
		console.log('path2polygon('+kelurahan+')');
		if(typeof window[kelurahan+'_paths']==undefined){
			console.log('path2polygon('+kelurahan+'):: window['+kelurahan+'+_paths] undefined');
			
		}else{
			console.log('path2polygon('+kelurahan+'):: window['+kelurahan+'] defined');
			console.log(window[kelurahan]);
			window[kelurahan+'_paths']=ar2path(window[kelurahan+'_ar']);
			window[kelurahan+'_polyOptions']= {
			  path: window[kelurahan+'_paths'],
			  strokeColor: "#FF0000",
			  strokeOpacity: 0.8,
			  strokeWeight: 2,
			  fillColor: "#0000FF",
			  fillOpacity: 0.6
			}
			window[kelurahan+'_polygon']=new google.maps.Polygon(window[kelurahan+'_polyOptions']);
			window[kelurahan+'_polygon'].setMap(window['FM_map']);
		}
	}
	
	
	</script>

</head>
<body>
<div id="map_canvas"></div>
</body>
</html>
